import React from 'react';

function UserGreeting(props) {
	return <h1>Welcome back!</h1>;
}

function GuestGreeting(props) {
	return <h1><a href="#">请登录</a></h1>
}

function Greeting(props) {
	const isLoggedIn = props.isLoggedIn;
	if(isLoggedIn) {
		return <UserGreeting />;
	} else {
		return <GuestGreeting />;
	}
}

export default Greeting